 
{$CLEO .cm}
{$USE cleo+}
wait 0
$onmission = 2 
33@=18000              // N + 1
const 
 random_int   = 23@ 
  first_key    = 78 
  second_key   = 189
  Random_model =24@
  Random_weapon =22@
  
  dummy=888@
end

  //Player disappear distants when too far 
 100@=100.0  
 101@=100.0  
 102@=100.0  
     dummy=actor.Create( 4,#MALE01, -2620.929, -5353.2412, 24.3862 )
     0337: set_actor dummy visibility 0
     05BE: AS_actor dummy die
    0619: enable_actor dummy collision_detection 0
    0489: set_actor dummy muted 1


    marker.CreateAboveActor(600@,dummy)
    018B: set_marker 600@ radar_mode 2
    marker.SetColor(600@ , 2 )
    marker.SetIconSize(600@,2)
 show_text_box "Watch out! Kill all the enemies!"   
model.Load(#AK47)
model.Load(#MP5LNG)
model.Load(#DESERT_EAGLE)
model.Load(#SAWNOFF)
model.Load(#M4)
model.Load(#TEC9)
model.Load(#SHOTGSPA) 
model.Load(#CHROMEGUN)
model.Load(#MICRO_UZI)
model.Load(#COLT45) 
model.Load(#MALE01)         
model.Load(#VLA1)       
model.Load(#VLA2)       
model.Load(#VLA3)       
model.Load(#ARMY)       
model.Load(#SWAT)       
038B: load_requested_models
 
  Random_model =  #ARMY
  Random_weapon = 22  

//wait 1000
//0208: 29@ = random_float_in_ranges 0.0 0.0
//0208: 30@ = random_float_in_ranges 0.0 0.0
//0208: 31@ = random_float_in_ranges 0.0 0.0
 float = 89@
 int = 88@ 
const
   NUM_KILLS = 80@
   
   

end


//--------------------------
 NUM_KILLS = 0 
 
//--------------------------

 018C: play_sound 1052 at 0.0 0.0 0.0

 04C4: store_coords_to 26@ 27@ 28@ from_actor $player_actor  with_offset 0.0 0.0 0.0
 if 
 not  is_object_defined 0@
 then
 0@ = object.Init(#AK47, 26@ ,27@, 28@ )
 0750: set_object 0@ visibility 0
 0382: set_object 0@ collision_detection 0

 end

   0ACD: show_text_highpriority "~r~~h~SPAWNED" time 3000
/////0@ = actor.Create(Gang7)
gosub @generator 
 25@ = actor.Angle($player_actor)  
 

wait 500
//MAIN

add_text_label '@KILLS' "~r~Enemies Killed ~w~~1~"
while true
wait 0 
03F0: enable_text_draw 1
045A: draw_text_1number 530.0 255.0 GXT '@KILLS' number  num_kills  // ALL RACES WON!~n~~w~$~1~
033F: set_text_draw_letter_size 0.3 1.3
//045B: draw_text_2numbers 320.0 390.0 GXT '@KILLS' numbers $TIME_MINS $6228  // ~1~:~1~

        if    
        cheat "exit"
        then
              0ACD: show_text_highpriority "~r~SHUTDOWN" time 3000
 
        jump @clear 
        end  
        gosub @spawning_Regions 
        gosub  @DEAD_GANGS
        gosub @losing_them 
end



 

:generator 
0208: 29@ = random_float_in_ranges -5.0 5.0
0208: 30@ = random_float_in_ranges -5.0 5.0
0208: 31@ = random_float_in_ranges -1.0 -1.0
//04C4: store_coords_to 26@ 27@ 28@ from_actor $player_actor  with_offset  29@ 30@ 31@


return

:DEAD_GANGS
if
056D:   actor 1@ defined
then
    if     and
    marker_enabled 51@
    0118:   actor 1@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(51@)
    01C2: remove_references_to_actor 1@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 2@ defined
then
    if and
       
    marker_enabled 52@
    0118:   actor 2@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(52@)
    01C2: remove_references_to_actor 2@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 3@ defined
then
    if      and
    marker_enabled 53@
    0118:   actor 3@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(53@)
    01C2: remove_references_to_actor 3@ // Like turning an actor into a random pedestrian
    end
end
if
056D:   actor 4@ defined
then
    if   and
    marker_enabled 34@
    0118:   actor 4@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(34@)
    01C2: remove_references_to_actor 4@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 5@ defined
then
    if   and
    marker_enabled 35@
    0118:   actor 5@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(35@ )
    01C2: remove_references_to_actor  5@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 6@ defined
then
    if   and
    marker_enabled 36@
    0118:   actor 6@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(36@)
    01C2: remove_references_to_actor 6@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 7@ defined
then
    if     and
    marker_enabled 37@
    0118:   actor 7@ dead

    then 
    NUM_KILLS += 1    
    marker.Disable(37@)    
    01C2: remove_references_to_actor 7@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 8@ defined
then
    if    and
    marker_enabled 38@ 
    0118:   actor 8@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(38@ )
    01C2: remove_references_to_actor 8@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 9@ defined
then
    if    and
    marker_enabled 39@
    0118:   actor 9@ dead

    then   
    NUM_KILLS += 1    
    marker.Disable(39@)
    01C2: remove_references_to_actor 9@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 10@ defined
then
    if   and
    marker_enabled 40@
    0118:   actor 10@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(40@)
    01C2: remove_references_to_actor 10@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 11@ defined
then
    if   and
    marker_enabled 41@
    0118:   actor 11@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(41@)
    01C2: remove_references_to_actor 11@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 12@ defined
then
    if and
    marker_enabled 42@ 
    0118:   actor 12@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(42@ )
    01C2: remove_references_to_actor 12@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 13@ defined
then
    if  and
    marker_enabled 13@
    0118:   actor 13@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(43@)
    01C2: remove_references_to_actor 13@ // Like turning an actor into a random pedestrian
    end
end
if
056D:   actor 14@ defined
then
    if    and
    marker_enabled 44@
    0118:   actor 14@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(44@)
    01C2: remove_references_to_actor 14@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 15@ defined
then
    if  and
    marker_enabled 45@
    0118:   actor 15@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(45@)
    01C2: remove_references_to_actor 15@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 16@ defined
then
    if   and
    marker_enabled 46@
    0118:   actor 16@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(46@)
    01C2: remove_references_to_actor 16@ // Like turning an actor into a random pedestrian
    end
end 

if
056D:   actor 17@ defined
then
    if  and
    marker_enabled 47@

    0118:   actor 17@ dead

    then
    NUM_KILLS += 1    
    marker.Disable(47@)
    01C2: remove_references_to_actor 17@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 18@ defined
then
    if  and
    marker_enabled 48@
    0118:   actor 18@ dead

    then
    marker.Disable(48@)
    NUM_KILLS += 1    
    01C2: remove_references_to_actor 18@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 19@ defined
then
    if  and
    marker_enabled 49@
    0118:   actor 19@ dead

    then
    marker.Disable(49@)
    01C2: remove_references_to_actor 19@ // Like turning an actor into a random pedestrian
    NUM_KILLS += 1    
    end
end 
if
056D:   actor 20@ defined
then
    if  and
    marker_enabled 50@
    0118:   actor 20@ dead

    then
    marker.Disable(50@)
    01C2: remove_references_to_actor 20@ // Like turning an actor into a random pedestrian
    NUM_KILLS += 1    
    end
end  




return

:losing_them

if
056D:   actor 1@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 1@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 1@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 2@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 2@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 2@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 3@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 3@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 3@ // Like turning an actor into a random pedestrian
    end
end
if
056D:   actor 4@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 4@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 4@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 5@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 5@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor  5@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 6@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 6@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 6@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 7@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 7@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 7@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 8@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 8@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 8@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 9@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 9@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 9@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 10@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 10@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 10@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 11@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 11@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 11@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 12@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 12@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 12@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 13@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 13@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 13@ // Like turning an actor into a random pedestrian
    end
end
if
056D:   actor 14@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 14@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 14@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 15@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 15@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 15@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 16@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 16@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 16@ // Like turning an actor into a random pedestrian
    end
end 



if
056D:   actor 17@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 17@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 17@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 18@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 18@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 18@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 19@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 19@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 19@ // Like turning an actor into a random pedestrian
    end
end 
if
056D:   actor 20@ defined
then
    if
    8104:  not  actor $PLAYER_ACTOR 20@ not_near_actor_radius 100@ 101@ 102@ sphere 0

    then
    01C2: remove_references_to_actor 20@ // Like turning an actor into a random pedestrian
    end
end  

return 
:Cleanup
if
056D:   actor 1@ defined
then
009B: destroy_actor 1@
end 
if
056D:   actor 2@ defined
then
009B: destroy_actor 2@
end 
if
056D:   actor 3@ defined
then
009B: destroy_actor 3@
end 

if
056D:   actor 4@ defined
then
009B: destroy_actor 4@
end 
if
056D:   actor 5@ defined
then
009B: destroy_actor 5@
end 
if
056D:   actor 6@ defined
then
009B: destroy_actor 6@
end 
if
056D:   actor 7@ defined
then
009B: destroy_actor 7@
end 
if
056D:   actor 8@ defined
then
009B: destroy_actor 8@
end 
if
056D:   actor 9@ defined
then
009B: destroy_actor 9@
end 
if
056D:   actor 10@ defined
then
009B: destroy_actor 10@
end 
if
056D:   actor 11@ defined
then
009B: destroy_actor 11@
end 
if
056D:   actor 12@ defined
then
009B: destroy_actor 12@
end 
if
056D:   actor 13@ defined
then
009B: destroy_actor 13@
end 
if
056D:   actor 14@ defined
then
009B: destroy_actor 14@
end 
if
056D:   actor 15@ defined
then
009B: destroy_actor 15@
end 
if
056D:   actor 16@ defined
then
009B: destroy_actor 16@
end 


if
056D:   actor 17@ defined
then
009B: destroy_actor 17@
end 
if
056D:   actor 18@ defined
then
009B: destroy_actor 18@
end 
if
056D:   actor 19@ defined
then
009B: destroy_actor 19@
end 
if
056D:   actor 20@ defined
then
009B: destroy_actor 20@
end  
 

return

:spawning_Regions
0209: 21@ = random_int_in_ranges 0 7
if 21@==0
then
   random_weapon=31 
  Random_model=#ARMY
end
if 21@==1
then
  random_weapon=31 
  Random_model=#ARMY
end
if 21@==2
then
  random_weapon=31 
  Random_model=#ARMY
end
if 21@==3
then
    random_weapon=24  
  Random_model=#ARMY
end
if 21@==4
then
    random_weapon=25 
  Random_model=#ARMY
end
if 21@==5
then
    random_weapon=30 
  Random_model=#ARMY
end
if 21@==6
then
    random_weapon=30 
  Random_model=#ARMY
end

   {
if is_object_defined 0@
then
// 0400: store_coords_to 26@ 27@ 28@ from_object 0@ with_offset   29@ 30@ 31@
end            }
0208: 165@ = random_float_in_ranges -100.0  100.0
0208: 166@ = random_float_in_ranges -100.0  100.0
0208: 167@ = random_float_in_ranges -15.0  35.0
04C4: store_coords_to  200@ 201@ 202@  from_actor player1 with_offset  165@ 166@ 167@

actor.PutAt(dummy, 200@, 201@ ,202@)


04C4: store_coords_to  26@ 27@ 28@ from_actor dummy with_offset 29@ 30@ 31@
0209: random_int = random_int_in_ranges 1 21
if coop
then
        if  and   
      //  89ED: not   actor dummy is_within_field_of_view_actor player1   
      //  89ED: not   actor dummy is_within_field_of_view_actor player2  
     8104: not  actor player1 near_actor dummy radius 40.0 40.0 40.0  sphere 0
     8104: not  actor player2 near_actor dummy radius 40.0 40.0 40.0  sphere 0
  
       // 80FE: not  actor player1 sphere 0 in_sphere  26@  27@  28@  radius 40.0 40.0 40.0 
       // 80FE: not  actor player2 sphere 0 in_sphere  26@  27@  28@  radius 40.0 40.0 40.0 
        jf @nope
        goto @Procced 
else
        if    
        8104: not  actor player1 near_actor dummy radius 40.0 40.0 40.0 sphere 0
// 89ED: not   actor dummy is_within_field_of_view_actor $PLAYER_ACTOR   
    //    80FE: not  actor $PLAYER_ACTOR sphere 0 in_sphere  26@  27@  28@  radius 30.0 30.0 30.0
        jf @nope
        goto @Procced 
end 

:Procced 

//Reset
{
if 33@ > 30000
then
   33@ = 0 
end } 
//  33@ > 20000
 06BD:   no_obstacles_between  26@  27@  28@   and 26@  27@  28@ solid 1 car 1 actor 0 object 1 particle 1
 
//0339:   anything_in_cube_cornerA  26@  27@  28@   cornerB 26@  27@  28@  solid 1 car 0 actor 1 object 1 particle 0
jf @nope
gosub @generator  
if  
model.Available(Random_model )  
jf @nope   
    if and
     random_int == 1  
     0019:   32@ > 164
     not is_actor_defined  1@
    then
        gosub @generator  
        1@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(1@)=25@
        actor.Health(1@) = 500
        actor.WeaponAccuracy(1@) = 80
        actor.GiveWeaponAndAmmo(1@, random_weapon, 99999)
        07FE: set_actor 1@ fighting_style_to 7 moves 6
        0446: set_actor 1@ dismemberment_possible false
        09B5: set_actor 1@ signal_after_kill 0
        0946: set_actor 1@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 1@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 1@ drowns_in_water true 
        
        marker.CreateAboveActor( 51@, 1@)          
        077A:  1@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  1@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  1@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        077A:  1@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
        
        05E2:   AS_actor 1@ kill player1
    018B: set_marker 51@ radar_mode 2

        32@ = 0 
    end   
    if and
     random_int == 2  
     0019:   32@ > 164
     not is_actor_defined  2@
    then
        gosub @generator  
        2@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(2@)=25@
        actor.Health(2@) = 500
        actor.WeaponAccuracy(2@) = 80
        actor.GiveWeaponAndAmmo(2@, random_weapon, 99999)
        07FE: set_actor 2@ fighting_style_to 7 moves 6
        0446: set_actor 2@ dismemberment_possible false
        09B5: set_actor 2@ signal_after_kill 0
        0946: set_actor 2@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 2@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 2@ drowns_in_water true 
        
        077A:  2@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                   
        077A:  2@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  2@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  2@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        marker.CreateAboveActor( 52@, 2@)          
        
        05E2:   AS_actor 2@ kill player1
    018B: set_marker 52@ radar_mode 2

        32@ = 0 
    end   
    if and
     random_int == 3  
     0019:   32@ > 164
     not is_actor_defined  3@
    then
        gosub @generator  
        3@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(3@)=25@
        actor.Health(3@) = 500
        actor.WeaponAccuracy(3@) = 80
        actor.GiveWeaponAndAmmo(3@, random_weapon, 99999)
        07FE: set_actor 3@ fighting_style_to 7 moves 6
        0446: set_actor 3@ dismemberment_possible false
        09B5: set_actor 3@ signal_after_kill 0
        0946: set_actor 3@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 3@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 3@ drowns_in_water true 
        
                  
        077A:  3@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
         077A:  3@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  3@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  3@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 3@ kill player1
        marker.CreateAboveActor( 53@,3@)          
    018B: set_marker 53@ radar_mode 2

        32@ = 0 
    end   
    if and
     random_int == 4
     0019:   32@ > 164
     not is_actor_defined  4@
    then
        gosub @generator  
        4@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(4@)=25@
        actor.Health(4@) = 500
        actor.WeaponAccuracy(4@) = 80
        actor.GiveWeaponAndAmmo(4@, random_weapon, 99999)
        07FE: set_actor 4@ fighting_style_to 7 moves 6
        0446: set_actor 4@ dismemberment_possible false
        09B5: set_actor 4@ signal_after_kill 0
        0946: set_actor 4@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 4@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 4@ drowns_in_water true 
        
        077A: 4@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                   
        077A:  4@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  4@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  4@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 4@ kill player1

        marker.CreateAboveActor( 34@, 4@)          
    018B: set_marker 34@ radar_mode 2
        32@ = 0 
    end   
    
    if and
     random_int == 5  
     0019:   32@ > 164
     not is_actor_defined  5@
    then
        gosub @generator  
        5@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(5@)=25@
        actor.Health(5@) = 500
        actor.WeaponAccuracy(5@) = 80
        actor.GiveWeaponAndAmmo(5@, random_weapon, 99999)
        07FE: set_actor 5@ fighting_style_to 7 moves 6
        0446: set_actor 5@ dismemberment_possible false
        09B5: set_actor 5@ signal_after_kill 0
        0946: set_actor 5@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 5@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 5@ drowns_in_water true 
        
                  
        077A:  5@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  5@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  5@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        077A:  5@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
         
        marker.CreateAboveActor( 35@, 5@)          
        05E2:   AS_actor 5@ kill player1
    018B: set_marker 35@ radar_mode 2

        32@ = 0 
    end   
    if and
     random_int == 6  
     0019:   32@ > 164
     not is_actor_defined  6@
    then
        gosub @generator  
        6@ = actor.Create(14, Random_model, 26@ ,27@ , 28@   )
        actor.Angle(6@)=25@
        actor.Health(6@) = 500
        actor.WeaponAccuracy(6@) = 80
        actor.GiveWeaponAndAmmo(6@, random_weapon, 99999)
        07FE: set_actor 6@ fighting_style_to 7 moves 6
        0446: set_actor 6@ dismemberment_possible false
        09B5: set_actor 6@ signal_after_kill 0
        0946: set_actor 6@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 6@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 6@ drowns_in_water true 
        
        077A:  6@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                   
        077A:  6@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  6@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  6@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        marker.CreateAboveActor( 36@, 6@)          
        05E2:   AS_actor 6@ kill player1
    018B: set_marker 36@ radar_mode 2

        32@ = 0 
    end   
    if and
     random_int == 7 
     0019:   32@ > 164
     not is_actor_defined  7@
    then
        gosub @generator  
        7@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(7@)=25@
        actor.Health(7@) = 500
        actor.WeaponAccuracy(7@) = 80
        actor.GiveWeaponAndAmmo(7@, random_weapon, 99999)
        07FE: set_actor 7@ fighting_style_to 7 moves 6
        0446: set_actor 7@ dismemberment_possible false
        09B5: set_actor 7@ signal_after_kill 0
        0946: set_actor 7@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 7@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 7@ drowns_in_water true 
        
        077A:  7@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
        
                  
        077A:  7@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  7@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  7@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        marker.CreateAboveActor( 37@, 7@)          
        
        05E2:   AS_actor 7@ kill player1
    018B: set_marker 37@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 8
     0019:   32@ > 164
     not is_actor_defined  8@
    then
        gosub @generator  
        8@ = actor.Create(14, Random_model  , 26@ ,27@ , 28@   )
        actor.Angle(8@)=25@
        actor.Health(8@) = 500
        actor.WeaponAccuracy(8@) = 80
        actor.GiveWeaponAndAmmo(8@, random_weapon, 99999)
        07FE: set_actor 8@ fighting_style_to 7 moves 6
        0446: set_actor 8@ dismemberment_possible false
        09B5: set_actor 8@ signal_after_kill 0
        0946: set_actor 8@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 8@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 8@ drowns_in_water true 
        
        
        077A:  8@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  8@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  8@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  8@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        marker.CreateAboveActor( 38@, 8@)          
        05E2:   AS_actor 8@ kill player1
    018B: set_marker 38@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 9
     0019:   32@ > 164
     not is_actor_defined  9@
    then
        gosub @generator  
        9@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(9@)=25@
        actor.Health(9@) = 500
        actor.WeaponAccuracy(9@) = 80
        actor.GiveWeaponAndAmmo(9@, random_weapon, 99999)
        07FE: set_actor 9@ fighting_style_to 7 moves 6
        0446: set_actor 9@ dismemberment_possible false
        09B5: set_actor 9@ signal_after_kill 0
        0946: set_actor 9@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 9@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 9@ drowns_in_water true 
        
        
        077A:  9@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  9@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  9@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  9@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        marker.CreateAboveActor( 39@, 9@)          
        05E2:   AS_actor 9@ kill player1
    018B: set_marker 39@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 10
     0019:   32@ > 164
     not is_actor_defined 10@
    then
        gosub @generator  
        10@ = actor.Create(14, Random_model, 26@ ,27@ , 28@   )
        actor.Angle(10@)=25@
        actor.Health(10@) = 500
        actor.WeaponAccuracy(10@) = 80
        actor.GiveWeaponAndAmmo(10@, random_weapon, 99999)
        07FE: set_actor 10@ fighting_style_to 7 moves 6
        0446: set_actor 10@ dismemberment_possible false
        09B5: set_actor 10@ signal_after_kill 0
        0946: set_actor 10@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 10@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 10@ drowns_in_water true 
        
        
        077A:  10@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  10@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  10@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  10@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 10@ kill player1
        marker.CreateAboveActor( 40@, 10@)          
    018B: set_marker 40@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 11
     0019:   32@ > 164
     not is_actor_defined 11@
    then
        gosub @generator  
        11@ = actor.Create(14, Random_model  , 26@ ,27@ , 28@   )
        actor.Angle(11@)=25@
        actor.Health(11@) = 500
        actor.WeaponAccuracy(11@) = 80
        actor.GiveWeaponAndAmmo(11@, random_weapon, 99999)
        07FE: set_actor 11@ fighting_style_to 7 moves 6
        0446: set_actor 11@ dismemberment_possible false
        09B5: set_actor 11@ signal_after_kill 0
        0946: set_actor 11@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 11@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 11@ drowns_in_water true 
        
        
        077A:  11@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  11@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  11@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  11@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 11@ kill player1
        marker.CreateAboveActor( 41@, 11@)          
    018B: set_marker 41@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 12
     0019:   32@ > 164
     not is_actor_defined 12@
    then
        gosub @generator  
        12@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(12@)=25@
        actor.Health(12@) = 500
        actor.WeaponAccuracy(12@) = 80
        actor.GiveWeaponAndAmmo(12@, random_weapon, 99999)
        07FE: set_actor 12@ fighting_style_to 7 moves 6
        0446: set_actor 12@ dismemberment_possible false
        09B5: set_actor 12@ signal_after_kill 0
        0946: set_actor 12@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 12@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 12@ drowns_in_water true 
        
        
        077A:  12@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  12@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  12@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  12@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 12@ kill player1
        marker.CreateAboveActor( 42@, 12@)          
    018B: set_marker 42@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 13
     0019:   32@ > 164
     not is_actor_defined 13@
    then
        gosub @generator  
        13@ = actor.Create(14, Random_model, 26@ ,27@ , 28@   )
        actor.Angle(13@)=25@
        actor.Health(13@) = 500
        actor.WeaponAccuracy(13@) = 80
        actor.GiveWeaponAndAmmo(13@,  random_weapon, 99999)
        07FE: set_actor 13@ fighting_style_to 7 moves 6
        0446: set_actor 13@ dismemberment_possible false
        09B5: set_actor 13@ signal_after_kill 0
        0946: set_actor 13@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 13@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 13@ drowns_in_water true 
        
        077A:  13@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
        
                  
        077A:  13@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  13@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  13@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 13@ kill player1
        marker.CreateAboveActor( 43@, 13@)          
     018B: set_marker 43@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 14
     0019:   32@ > 164
     not is_actor_defined 14@
    then
        gosub @generator  
        14@ = actor.Create(14, Random_model, 26@ ,27@ , 28@   )
        actor.Angle(14@)=25@
        actor.Health(14@) = 500
        actor.WeaponAccuracy(14@) = 80
        actor.GiveWeaponAndAmmo(14@, random_weapon, 99999)
        07FE: set_actor 14@ fighting_style_to 7 moves 6
        0446: set_actor 14@ dismemberment_possible false
        09B5: set_actor 14@ signal_after_kill 0
        0946: set_actor 14@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 14@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 14@ drowns_in_water true 
        
        
        077A:  14@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  14@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  14@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  14@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 14@ kill player1
        marker.CreateAboveActor( 44@, 14@)          
    018B: set_marker 44@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 15
     0019:   32@ > 164
     not is_actor_defined 15@
    then
        gosub @generator  
        15@ = actor.Create(14, Random_model  , 26@ ,27@ , 28@   )
        actor.Angle(15@)=25@
        actor.Health(15@) = 500
        actor.WeaponAccuracy(15@) = 80
        actor.GiveWeaponAndAmmo(15@, random_weapon, 99999)
        07FE: set_actor 15@ fighting_style_to 7 moves 6
        0446: set_actor 15@ dismemberment_possible false
        09B5: set_actor 15@ signal_after_kill 0
        0946: set_actor 15@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 15@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 15@ drowns_in_water true 
        
          
        077A:  15@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                
        077A:  15@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  15@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  15@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 15@ kill player1
        marker.CreateAboveActor( 45@, 15@)          
    018B: set_marker 45@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 16
     0019:   32@ > 164
     not is_actor_defined 16@
    then
        gosub @generator  
        16@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(16@)=25@
        actor.Health(16@) = 500
        actor.WeaponAccuracy(16@) = 80
        actor.GiveWeaponAndAmmo(16@, random_weapon, 99999)
        07FE: set_actor 16@ fighting_style_to 7 moves 6
        0446: set_actor 16@ dismemberment_possible false
        09B5: set_actor 16@ signal_after_kill 0
        0946: set_actor 16@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 16@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 16@ drowns_in_water true 
        
         
        077A:  16@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                 
        077A:  16@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  16@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  16@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 16@ kill player1
        marker.CreateAboveActor( 46@, 16@)          

    018B: set_marker 46@ radar_mode 2
        32@ = 0 
    end       
    if and
     random_int == 17
     0019:   32@ > 164
     not is_actor_defined 17@
    then
        gosub @generator  
        17@ = actor.Create(14, Random_model , 26@ ,27@ , 28@   )
        actor.Angle(17@)=25@
        actor.Health(17@) = 500
        actor.WeaponAccuracy(17@) = 80
        actor.GiveWeaponAndAmmo(17@, random_weapon, 99999)
        07FE: set_actor 17@ fighting_style_to 7 moves 6
        0446: set_actor 17@ dismemberment_possible false
        09B5: set_actor 17@ signal_after_kill 0
        0946: set_actor 17@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 17@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 17@ drowns_in_water true 
         
        
        077A:  17@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  17@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  17@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  17@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
    018B: set_marker 47@ radar_mode 2
        05E2:   AS_actor 17@ kill player1
        marker.CreateAboveActor( 47@, 17@)          

        32@ = 0 
    end       
    if and
     random_int == 18
     0019:   32@ > 164
     not is_actor_defined 18@
    then
        gosub @generator  
        18@ = actor.Create(14, Random_model  , 26@ ,27@ , 28@   )
        actor.Angle(18@)=25@
        actor.Health(18@) = 500
        actor.WeaponAccuracy(18@) = 80
        actor.GiveWeaponAndAmmo(18@, random_weapon, 99999)
        07FE: set_actor 18@ fighting_style_to 7 moves 6
        0446: set_actor 18@ dismemberment_possible false
        09B5: set_actor 18@ signal_after_kill 0
        0946: set_actor 18@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 18@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 18@ drowns_in_water true 
         
        
        077A:  18@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  18@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  18@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  18@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 18@ kill player1
        marker.CreateAboveActor( 48@, 18@)          
    018B: set_marker 48@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 19
     0019:   32@ > 164
     not is_actor_defined 19@
    then
        gosub @generator  
        19@ = actor.Create(14, Random_model  , 26@ ,27@ , 28@   )
        actor.Angle(19@)=25@
        actor.Health(19@) = 500
        actor.WeaponAccuracy(19@) = 80
        actor.GiveWeaponAndAmmo(19@, random_weapon, 99999)
        07FE: set_actor 19@ fighting_style_to 7 moves 6
        0446: set_actor 19@ dismemberment_possible false
        09B5: set_actor 19@ signal_after_kill 0
        0946: set_actor 19@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 19@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 19@ drowns_in_water true 
         
        
        077A:  19@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                  
        077A:  19@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  19@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  19@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 19@ kill player1
        marker.CreateAboveActor( 49@, 19@)          
    018B: set_marker 49@ radar_mode 2

        32@ = 0 
    end       
    if and
     random_int == 20
     0019:   32@ > 164
     not is_actor_defined 20@
    then
        gosub @generator  
        20@ = actor.Create(14, Random_model, 26@ ,27@ , 28@   )
        actor.Angle(20@)=25@
        actor.Health(20@) = 500
        actor.WeaponAccuracy(20@) = 80
        actor.GiveWeaponAndAmmo(20@, random_weapon, 99999)
        07FE: set_actor 20@ fighting_style_to 7 moves 6
        0446: set_actor 20@ dismemberment_possible false
        09B5: set_actor 20@ signal_after_kill 0
        0946: set_actor 20@ actions_uninterupted_by_weapon_fire true
        07DD: set_actor 20@ attack_rate 100 // previously known as temper_to
        //0816: dont_chase_Victim 20@ drowns_in_water true 
         
         
        077A:  20@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
                 
        077A:  20@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        077A:  20@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
        077A:  20@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
        
        05E2:   AS_actor 20@ kill player1
        marker.CreateAboveActor( 50@, 20@)          
    018B: set_marker 50@ radar_mode 2

        32@ = 0 
    end       
     
:nope       
return 


:clear 
if is_object_defined 0@
then        
   object.Destroy(0@)
end 
018C: play_sound 1053 at 0.0 0.0 0.0
marker.Disable(600@)   
model.Destroy(#AK47)
model.Destroy(#MP5LNG)
model.Destroy(#DESERT_EAGLE)
model.Destroy(#SAWNOFF)
model.Destroy(#M4)
model.Destroy(#TEC9)
model.Destroy(#SHOTGSPA) 
model.Destroy(#CHROMEGUN)
model.Destroy(#MICRO_UZI)
model.Destroy(#COLT45) 
model.Destroy(#MALE01)    

model.Destroy(#VLA1)       
model.Destroy(#VLA2)       
model.Destroy(#VLA3)     
model.Destroy(#SWAT)     
model.Destroy(#ARMY)     
//gosub @Cleanup 
$onmission = 0 
 show_text_box "End"   

mission_cleanup
end_thread
  